package com.jcc.springcloud.controller;

import com.jcc.springcloud.file.FuncResource;
import com.jcc.springcloud.service.ManagerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
public class ManagerController {
    @Resource
    private ManagerService managerService;

    //上传函数
    @ResponseBody
    @PostMapping(value = "/upload")
    public FuncResource upload(@RequestBody FuncResource funcResource) throws Exception {
        return managerService.upload(funcResource);
    }
}
